package com.git.util;

import java.io.File;

public class DeleteFileTest {
	public boolean deleteFileTest(String path){
		File file = new File(path);
		
		if (!file.exists()) {
			return false;
		}
		
		String[] tempList = file.list();
		File temp = null;
		
		for (int i = 0; i < tempList.length; i++){
			System.out.println("tempList i-->"+tempList[i]);
			
			if (path.endsWith(File.separator)) {
				temp = new File(path + tempList[i]);
			} else {
				temp = new File(path + File.separator + tempList[i]);
			}
			
			
			if (temp.isFile()) {
				System.out.println("temp file-->"+temp);
			    temp.delete();
			}
		}
		
		return true;
		
	}
	
	public static void main(String[] args){
		DeleteFileTest delF = new DeleteFileTest();
		delF.deleteFileTest("E:/yangwwork/ChinareAccessLoad/WebRoot/chinareLoad/acc_source/demo1203/02");
	}

}
